package com.haochang.chunkvod.app.config;

/**
 * 
 * @author lxl 2014-12-23-下午12:09:19
 * 
 *         服务器信息配置: 环境选择 接口地址
 */
public class ServerConfig
{
	public static String serverIp = "";
	public static final String onlineIp = "http://192.168.2.45";// 线上服务器
	public static String qATestPreVersionEnvironmentIp = "http://test.api.haochang.tv";// QA测试服务器
	//	public static String qATestEnvironmentIp = "http://android.k.haochang.tv";//
	//	public static String qATestEnvironmentIp = "http://192.168.3.20";// 冯再新电脑
	//	public static String qATestEnvironmentIp = "http://192.168.3.206";// 杨忠
	//	public static String qATestEnvironmentIp = "http://192.168.2.138";// 陈亚荣
	public static String qATestEnvironmentIp = "http://branch.k.haochang.tv";// QA测试服务器内网
	//	public static String qATestEnvironmentIp = "http://test.branch.k.haochang.tv";// QA测试服务器外网
	public static String developmentEnvironmentIp = "http://new.dev.api.haochang.tv";// 开发服务器
	public static final String KTV_SERVERIP = "http://192.168.254.240/downloads/?isconnect";// ktv

	//	public static final String UPDATE_VERSION = "http://test.centre.k.haochang.tv";// 版本更新,杨忠的电脑
	public static final String UPDATE_VERSION = "http://c.chunk.cn";// 版本更新,正式的

	/**
	 * 初始化服务器接口信息
	 * 
	 */
	public static void initServerConifg(ServerAddressEnum serverAddressEnum)
	{
		switch (serverAddressEnum)
		{
		case SERVERADDRESS_DEVELOPMENT:
			serverIp = developmentEnvironmentIp;
			break;
		case SERVERADDRESS_QA:
			serverIp = qATestEnvironmentIp;
			break;
		case SERVERADDRESS_QA_PREVERSION:
			serverIp = qATestPreVersionEnvironmentIp;
			break;
		case SERVERADDRESS_ONLINE:
			serverIp = qATestEnvironmentIp;
			break;
		default:
			break;
		}
	}

	/**
	 * 
	 * @author lxl 2015-1-5-下午12:37:00
	 * 
	 *         服务器环境配置
	 * 
	 */
	public enum ServerAddressEnum
	{
		/**
		 * 内网开发环境
		 */
		SERVERADDRESS_DEVELOPMENT,
		/**
		 * QA测试环境
		 */
		SERVERADDRESS_QA,
		/**
		 * QA上个版本测试环境
		 */
		SERVERADDRESS_QA_PREVERSION,
		/**
		 * 正式环境
		 */
		SERVERADDRESS_ONLINE
	}
}
